<%@ page pageEncoding="UTF-8"%>
<%@ include file="/common/validate.jsp"%>
<%@ include file="../function.jsp" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>查看医生详情</title>
    <link  href="../../images/favicon.ico?cache=<%=Math.random()%>" rel="shortcut icon" type="image/x-icon">
    <link rel="stylesheet" href="../../css/public.css?cache=<%=Math.random()%>">
    <link rel="stylesheet" href="../../css/messages_doctor_mes_add.css?cache=<%=Math.random()%>">
    <script src="/js/jquery-1.9.1.min.js"></script>
</head>
<body>
<%@ include file="../../header.jsp"%>
<!--内容-->
<div class="containerone">
    <%@ include file="../../left_menu.jsp"%>
    <!--右边内容-->
    <div class="right_cont">

        <!--右边内容-->
        <div class="message_right_cont_box" id="see_doctor">

            <div class="message_right_cont_container">
                <div class="add_doctor">
                    <span>医生信息</span>
                    <button class="back_doctor_mes" @click="back()"><a>返回</a></button>
                </div>
                <div class="mes_see_con_right">
                    <div class="mes_see">
                        <div class="mes_see_image">
                            <img :src="doctor_detail.head_image">
                        </div>
                    </div>
                    <div class="mes_see_intro">
                        <span> 医生工号：<span class="dis_inline" v-html="doctor_detail.expertId"></span></span>
                        <span>医生姓名：<span class="dis_inline" v-html="doctor_detail.name"></span></span>
                        <span> 医生级别：<span class="dis_inline" v-html="doctor_detail.title"></span></span>
                        <span>所属科室：<span class="dis_inline" v-html="doctor_detail.deptName"></span></span>
                    </div>
                    <div class="clearfix"></div>
                </div>
                <div class="mes_see_con_below">
                    <span><p>医生擅长：</p><span v-html="doctor_detail.specialty"></span></span>
                    <span><p>医生简介：</p><div v-html="decode(doctor_detail.content)"></div></span>
                    <div class="clearfix"></div>
                </div>
                <div class="mes_see_edit">
                    <button class="back_doctor_mes" @click="edit(doctor_detail.id)">编辑信息</button>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    new Vue({
        el:'#see_doctor',
        data:{
            id:"",
            doctor_detail:[]
        },
        ready:function(){
            var self = this;
            var see_doctor = getHrefParms("see_doctor");
            self.id = see_doctor.id;
            $.ajax({
                type: 'POST',
                url: "see_doctor.jsp",
                data: {
                    act: "show_doctor",
                    id:self.id,
                },
                success: function(res) {
                    res = JSON.parse(res);
                    if (res.errcode == 0) {
                        self.doctor_detail = res.expert;
                        console.log(res.expert)
                    } else {
                        swal("没有相关数据");
                    }
                },
            });
        },
        methods:{

            decode: function(i) {
                return decodeURI(i);
            },
            edit:function(item){
                locationHerf("edit_doctor", {
                    id:item
                });
            },
            back:function(id){
                location.href="see.jsp";
            },
            decode: function(i) {
                return decodeURI(i);
            },
        }
    })
</script>

</body>
</html>
